package com.example.tests;

import java.util.Set;
import java.util.logging.Logger;


import org.testng.annotations.Test;

public class ContactCreationTests extends TestBase {
	
	private Logger log = Logger.getLogger("ContactCreationTests");
	
	@Test(dataProvider = "contactsFromFile", dataProviderClass = ContactDataGenerator.class)
	public void testValidContactCanBeCreated(ContactObject validContact) throws Exception {
			Set<ContactObject> oldList = app.getContactHelper().getContacts();
			// action
			app.getContactHelper().createContact(validContact);
			// verification
			Set<ContactObject> newList = app.getContactHelper().getContacts();
			verifyContactAdded(oldList, validContact, newList);
		}
	}

